package com.lins.saas.config;

import com.baomidou.mybatisplus.core.config.GlobalConfig;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.lins.common.mp.config.BaseMPConfig;
import com.lins.saas.service.impl.FillMetaServiceImpl;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

/**
 * @author yuxiaolin
 * @title: MybatisConfig
 * @projectName lins
 * @description: mybatis-plus
 * @date 2021/12/13 4:01 下午
 */

@Configuration
@MapperScan(basePackages = MybatisConfig.PACKAGE)
public class MybatisConfig extends BaseMPConfig {

    static final String PACKAGE = "com.lins.saas.mapper";

    @Resource
    private FillMetaServiceImpl fillMetaService;



    /**
     * mybatis-plus 全局设定
     * @return
     */

    @Bean
    public GlobalConfig globalConfig()
    {
       return globalConfig(fillMetaService);
    }

    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor()
    {
        return super.mybatisPlusInterceptor();
    }

}

